import { RouteRecordRaw, viewDepthKey } from "vue-router";
import { RouterTransition } from "@c/transition";
import commonRoutes from "./routes";
const asyncRoutes: Array<RouteRecordRaw> = [
  {
    path: "home",
    name: "Home",
    meta: {
      title: "首页",
      icon: "icon_missionary_work",
    },
    component: () => import("@/pages/home.vue"),
  },
  {
    path: "post",
    name: "Post",
    meta: {
      title: "文章",
      icon: "icon_missionary_work",
    },
    component: () => import("@/pages/post.vue"),
  },
  ...commonRoutes.children,
];

export default {
  path: "/",
  name: "Layout",
  component: () => import("@/components/layout/index.vue"),
  redirect: "/home",
  children: [...asyncRoutes],
};
